import http from "@/util/http";

export function reg(user){
   ///api === http://localhost:8080/usermanager/users/
   return http.post('/api/users/',user);
}

export function login(params){
   return http.get('/api/users/auth',params);
}

export function checkIsReg(params){
   return http.get('/api/users/checkIsReg',params);
}

export function isLogin(){
   //console.log("---------执行了api里面的 isLogin方法-----------")
   return http.get('/api/users/isLogin');
}

export function logout(){
   return http.get('/api/users/logout');
}

export function update(user){
   return http.put('/api/users/',user);
}

export default {reg,login,checkIsReg,isLogin};

